package org.display.graphic.line
{
	import flash.geom.Point;
	
	import org.utils.*;
	public class DependenceLine extends LineBase
	{
		public function DependenceLine()
		{
			super()
			redraw()
		}
		
		protected override function redraw(){
			
			ElementControl.cleanObj(line)
			ElementControl.cleanObj(rot)
				
			line=DrawShape.line(linethick,linecolor,p1,p2)
			rot=DrawShape.diamond(linethick,linecolor,new Point(),new Point(3,-3),new Point(6,0),new Point(3,3))
			rot.x=p2.x
			rot.y=p2.y	
				
			rot.rotation=Math.atan2(p2.y-p1.y,p2.x-p1.x)/(Math.PI/180)
				
			addChild(line)
			addChild(rot)
			
			addChild(square1)
			addChild(square2)

		}
	}
}